import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { EUpdateType } from "./EUpdateType";
import { SPlayerItem } from "./SPlayerItem";
type int = number;
//class SBusinessItemUpdate
    
    export  class SBusinessItemUpdate extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SBusinessItemUpdate();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            this.updateType.__write(arg1);
            arg1.writeInt(this.index);
            arg1.writeInt(this.coin);
            arg1.writeInt(this.gold);
            this.playerItem.__write(arg1);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.updateType = EUpdateType.__read(arg1);
            this.index = arg1.readInt();
            this.coin = arg1.readInt();
            this.gold = arg1.readInt();
            this.playerItem = new SPlayerItem();
            this.playerItem.__read(arg1);
            return;
        }

        public /* const */_type: int=20300;

        public /* var */updateType: EUpdateType;

        public /* var */index: int;

        public /* var */coin: int;

        public /* var */gold: int;

        public /* var */playerItem: SPlayerItem;

        public static /* var */_regist: SBusinessItemUpdate;
    }

            SBusinessItemUpdate._regist = new SBusinessItemUpdate(true);
        